file-chooser: allow views to extend to the sides of the dialog
authorWilliam Jon McCann <william.jon.mccann@gmail.com>
Mon, 7 Apr 2014 21:18:56 +0000 (17:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Apr 2014 02:34:56 +0000 (22:34 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=722211

gtk/gtkfilechooserwidget.c
gtk/resources/ui/gtkfilechooserdialog.ui
gtk/resources/ui/gtkfilechooserwidget.ui

index d97472551da62e49a0518ea2488b30ebbf48b314..80bce601f376ef313908bcabab87a89b907baf41 100644 (file)
@@ -1960,6 +1960,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
   location_switch_to_path_bar (impl);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
 
   priv->save_widgets_table = gtk_grid_new ();
   gtk_box_pack_start (GTK_BOX (vbox), priv->save_widgets_table, FALSE, FALSE, 0);
@@ -2026,7 +2027,7 @@ location_switch_to_path_bar (GtkFileChooserWidget *impl)
       priv->location_entry = NULL;
     }
 
-  gtk_widget_hide (priv->location_entry_box);
+  gtk_widget_hide (priv->browse_header_box);
 }
 
 /* Turns on the location entry.  Can be called even if we are already in that
@@ -2038,7 +2039,7 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
   /* when in search or recent files mode, we are not showing the
-   * location_entry_box container, so there's no point in switching
+   * browse_header_box container, so there's no point in switching
    * to it.
    */
   if (priv->operation_mode == OPERATION_MODE_SEARCH ||
@@ -2047,7 +2048,7 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
 
   /* Box */
 
-  gtk_widget_show (priv->location_entry_box);
+  gtk_widget_show (priv->browse_header_box);
 
   /* Entry */
 
@@ -2142,7 +2143,7 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl)
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
   /* when in search or recent files mode, we are not showing the
-   * location_entry_box container, so there's no point in switching
+   * browse_header_box container, so there's no point in switching
    * to it.
    */
   if (priv->operation_mode == OPERATION_MODE_SEARCH ||
@@ -2586,7 +2587,7 @@ operation_mode_set_browse (GtkFileChooserWidget *impl)
       location_mode_set (impl, priv->location_mode, TRUE);
 
       if (priv->location_mode == LOCATION_MODE_FILENAME_ENTRY)
-       gtk_widget_show (priv->location_entry_box);
+       gtk_widget_show (priv->browse_header_box);
     }
 }
 
@@ -2614,7 +2615,7 @@ operation_mode_set_recent (GtkFileChooserWidget *impl)
       priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
     {
       gtk_widget_hide (priv->location_button);
-      gtk_widget_hide (priv->location_entry_box);
+      gtk_widget_hide (priv->browse_header_box);
     }
 
   recent_start_loading (impl);
@@ -6441,7 +6442,7 @@ search_setup_widgets (GtkFileChooserWidget *impl)
       priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
     {
       gtk_widget_hide (priv->location_button);
-      gtk_widget_hide (priv->location_entry_box);
+      gtk_widget_hide (priv->browse_header_box);
     }
 
   focus_search_entry_in_idle (impl);
index d9c7e733fe15aa52ccad0f5a8358a49167e00f1b..c08ebd762a63accd70d9df9d611f32c89c5839c0 100644 (file)
@@ -3,13 +3,14 @@
   <!-- interface-requires gtk+ 3.10 -->
   <template class="GtkFileChooserDialog" parent="GtkDialog">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
+    <property name="border_width">0</property>
     <property name="role">GtkFileChooserDialog</property>
     <property name="type_hint">dialog</property>
     <property name="default_width">600</property>
     <signal name="response" handler="response_cb" swapped="no"/>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
+        <property name="border_width">0</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
@@ -35,7 +36,7 @@
           <object class="GtkFileChooserWidget" id="widget">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="border_width">5</property>
+            <property name="border_width">0</property>
             <property name="orientation">vertical</property>
             <signal name="default-size-changed" handler="file_chooser_widget_default_size_changed" swapped="no"/>
             <signal name="file-activated" handler="file_chooser_widget_file_activated" swapped="no"/>
index 93a3d2a16d5f31e773385b2937ed3c62211baf2f..9752e210e1657f36cd29cdf8b7b69531688a6d27 100644 (file)
   <template class="GtkFileChooserWidget" parent="GtkBox">
     <property name="can_focus">False</property>
     <property name="orientation">vertical</property>
-    <property name="spacing">12</property>
+    <property name="spacing">0</property>
     <child>
       <object class="GtkBox" id="browse_widgets_box">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
+        <property name="spacing">0</property>
         <child>
           <object class="GtkBox" id="browse_header_box">
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
+            <property name="border_width">10</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkBox" id="location_entry_box">
+                <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="spacing">12</property>
                 <child>
           <object class="GtkPaned" id="browse_widgets_hpaned">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <property name="border_width">0</property>
             <child>
               <object class="GtkPlacesSidebar" id="places_sidebar">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hscrollbar_policy">never</property>
-                <property name="shadow_type">in</property>
+                <property name="shadow_type">none</property>
                 <property name="local_only">True</property>
                 <signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
                 <signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">6</property>
+                <property name="spacing">0</property>
                 <child>
                   <object class="GtkBox" id="browse_path_bar_hbox">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
+                    <property name="border_width">6</property>
                     <child>
                       <object class="GtkToggleButton" id="location_button">
                         <property name="visible">True</property>
     <child>
       <object class="GtkBox" id="extra_and_filters">
         <property name="visible">True</property>
+        <property name="border_width">10</property>
         <child>
           <object class="GtkBox" id="extra_align">
             <property name="can_focus">False</property>